package nodes

// NodePicker is an interface, it provides a method 'PickNode',
// It will pick a specified NodeHandler based on the input parameter 'key'
type NodePicker interface {
	GetSelfAddress() string
	GetAllNodes() []string
	GetBrotherNodes() map[string]string
	AddNodes(nodesMap map[string]string)
	PickNode(key string) (node NodeHandler, ok bool)
	PickAllNodes() []NodeHandler
}

type NodeHandler interface {
	SetGroup(group string) error
	DeleteGroup(group string) error
	GetBaseAddr() string
	Get(group string, key string) ([]byte, error)
	Set(group string, key string, value []byte) error
	Delete(group string, key string) error
}
